package org.ggb.controller;

import org.ggb.pojo.Product;
import org.ggb.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    private ProductService productService;
    /**
     * 获取商品列表信息
     */
    @GetMapping("/list")
    public List<Product> selectProductList(){
        return productService.selectProductList();
    }
}
